ห้าเสาหลักของการใช้คำสั่ง
นอกเหนือจากอินเตอร์เฟซการพูดคุยแบบง่าย ๆ โมเดลภาษาขนาดใหญ่ (LLMs)เป็นเครื่องมือที่ซับซ้อนสำหรับการประมวลผลข้อมูลที่มีโครงสร้าง บทเรียนนี้แนะนำฟังก์ชัน "พื้นฐาน" ห้าประเภทที่ทำให้นักพัฒนาสามารถรวมปัญญาประดิษฐ์เข้ากับกระบวนการงานได้อย่างมืออาชีพ
แผนผังการทำงาน
- สรุปเนื้อหา:ลดทอนข้อความจำนวนมาก (เช่น รีวิวสินค้า) ให้กลายเป็นสรุปสั้น ๆ โดยคงข้อมูลสำคัญไว้
- ตีความ/วิเคราะห์:ทำการวิเคราะห์อัตโนมัติ เช่น การตรวจจับอารมณ์ ระบุความรู้สึก หรือดึงข้อมูลเฉพาะเจาะจง เช่น ชื่อแบรนด์ ออกมาในรูปแบบข้อมูลเชิงโครงสร้าง เช่น ไฟล์ JSON
- แปลงข้อมูล:แปลงข้อความจากรูปแบบหนึ่งไปยังอีกรูปแบบหนึ่ง ซึ่งรวมถึงการแปลภาษา การปรับโทน (ตัวอย่างเช่น จากทางการเป็นไม่เป็นทางการ) และการเปลี่ยนแปลงรูปแบบข้อมูล (ตัวอย่างเช่น จาก JSON เป็น HTML)
- ขยายความ:นำสัญญาณสั้น ๆ หรือรายการจุดเล็ก ๆ มาสร้างเนื้อหาที่ยาวขึ้น เช่น อีเมลบริการลูกค้าที่ปรับแต่งเฉพาะบุคคล
- แชทบ็อต:ใช้ประวัติการสนทนาและบทบาทที่กำหนดไว้ (ระบบ ผู้ใช้ ผู้ช่วย) เพื่อสร้างผู้ช่วยที่มีปฏิสัมพันธ์และรับรู้บริบท
ลักษณะไร้สถานะของโมเดลภาษาขนาดใหญ่
แนวคิดสำคัญ:แตกต่างจากมนุษย์ โมเดลภาษาขนาดใหญ่เป็น "ไร้สถานะ" พวกเขาจะไม่จำการโต้ตอบครั้งก่อนหน้า เว้นแต่คุณจะส่งประวัติการสนทนาทั้งหมดกลับไปยังพวกเขาในแต่ละคำขอผ่าน API ประวัติที่สะสมกันนี้เรียกว่าบริบท.
TERMINALbash — 80x24
> Ready. Click "Run" to execute.
>
Question 1
A developer needs to extract the "Price" and "Discount Code" from 1,000 emails and save them to a database. Which approach and temperature setting are most appropriate?
Challenge: Tone Transformer
Apply the Transforming and Chatbot role concepts.
You are building a "Tone Transformer" for a corporate helpdesk. You need to convert a frustrated user's slang-heavy complaint into a "Formal" and "Polite" summary for a manager.
Task
Specify the role of the "System" message to ensure the model acts appropriately, and write the "User" prompt to translate: 'The app is buggy as heck and I want my money back ASAP!'
System Message:
User Prompt:
Expected Result:
"You are a professional executive assistant. Your task is to rephrase communication into a formal, corporate-appropriate tone."User Prompt:
"Translate the following text into a formal summary: 'The app is buggy as heck and I want my money back ASAP!'"Expected Result:
"The customer is reporting technical instability within the application and is requesting an immediate refund."